// ==UserScript==
// @name         panshidata Info Input
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  panshidata.com页面加载完成后弹出对话框，可输入信息并获取指定xpath标签的值。
// @author       wushifengcn@qq.com
// @match        https://tagger.panshidata.com/*
// @grant        none
// ==/UserScript==

(function () {
  "use strict";
  //window.addEventListener("load", function () {
  console.log("panshidata...");
  var dialog = document.createElement("div");
  dialog.style.position = "fixed";
  dialog.style.top = "auto";
  dialog.style.left = "10px";
  dialog.style.bottom = "30px";
  dialog.style.right = "auto";
  dialog.style.transform = "none";
  dialog.style.zIndex = "9999";
  dialog.style.backgroundColor = "white";
  dialog.style.padding = "20px";
  dialog.style.border = "1px solid black";

  let btn = document.createElement("button");
  btn.style.border = "2px solid #007BFF"; // Add a blue border
  btn.style.borderRadius = "2px"; // Round the corners
  btn.textContent = "位置调整";
  btn.addEventListener("click", () => {
    console.log("click... 208px");
    //height: 148px; width: 50%; overflow-y: auto; border-right: 1px solid rgb(233, 241, 255); padding: 15px 0px 15px 15px;
    document.querySelector(
      "div.relationContentRight > :first-child > :first-child"
    ).style.height = "208px";
    //style="position: absolute; width: 99%; top: 219px; height: 202px; z-index: 999; background-color: rgb(230, 247, 255); opacity: 0.2;"
    document.getElementById("eventtypemask").style.top = "279px";
  });
  dialog.appendChild(btn);

  document.body.appendChild(dialog);
  //});
})();
